<!DOCTYPE html PUBLIC 
	"-//W3C//DTD XHTML 1.1 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/inc/taglibs.jsp"%>
<%@ taglib prefix="decorator"
	uri="http://www.opensymphony.com/sitemesh/decorator"%>
<%@ taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page"%>
<html lang="es">
<head>
<title><fmt:message key="titulo" /> <decorator:title /></title>
<link
	href="<c:url value="/css/smoothness/jquery-ui-1.8.13.custom.css"/>"
	rel="stylesheet" type="text/css">
<link href="<c:url value="/css/styles/main.css"/>" rel="stylesheet"
	type="text/css">
<link href="<c:url value="/css/base.css"/>" rel="stylesheet"
	type="text/css">
<link href="<c:url value="/css/jmesa.css"/>" rel="stylesheet"
	type="text/css">
<script type="text/javascript"
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript"
	src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>
<script type="text/javascript"
	src="<c:url value="/js/jquery.dateFormat-1.0.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/regional/jquery.ui.datepicker-es.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/funciones.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/jquery.jmesa.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/jmesa-min.js"/>"></script>
<script type="text/javascript">
	var $ = jQuery;
	var URL = "<c:url value="/"/>";
	var MenuPpl = "accion/ajax/menu/principal";
	var MenuSec = "accion/ajax/menu/secundario";
	function menuPpl() {
		$.getJSON(URL + MenuPpl, {
			id : 0
		}, function(data) {
			var result = "";
			for ( var i = 0; i < data.length; i++) {
				result += "<li><a";
				if (i == (data.length - 1)) {
					result += " class=\"last\"";
				}
				result += " href=\"" + data[i].nombre + "\">" + data[i].titulo
						+ "</li>";
			}
			$("#menuPripal").html(result);
		});
	}
	function menuSec() {
		var id = "${idMenu}";
		$.getJSON(URL + MenuSec, {
			id : id == "" ? 0 : id
		}, function(data) {
			var result = "";
			for ( var i = 0; i < data.length; i++) {
				result += "<li><a href='"+ data[i].nombre + "'>"
						+ data[i].titulo + "</li>";
			}
			$("#contenido").html(result);
		});
	}
	$(document).ready(function() {
		menuPpl();
		menuSec();
	});
</script>
<decorator:head />
</head>
<body id="page-home">
	<div id="page">
		<div id="header" class="clearfix">
			<span style="float: right"> <a href="?lang=es">es</a> | <a
				href="?lang=en">en</a> | <a href="?lang=fr">fr</a> </span><br /> <span
				style="float: right"> <a href="?theme=default">def</a> | <a
				href="?theme=black">blk</a> | <a href="?theme=blue">blu</a> </span><br />
			<span style="float: right"> <c:if
					test="${not empty sessionScope.usuario}">
					<a href="${singout}"><fmt:message key="exit" /> </a>
				</c:if> <c:if test="${empty sessionScope.usuario}">
					<a href="${singin}"><fmt:message key="enter" /> </a>
				</c:if> </span>
		</div>

		<div id="content" class="clearfix">
			<div id="main">
				<decorator:body />
				<hr />
			</div>

			<div id="sub">
				<h3>Sub Content</h3>
			</div>


			<div id="local">
				<ul id="contenido">
				</ul>
			</div>

			<div id="nav">
				<ul id="menuPripal" class="clearfix">
				</ul>
				<hr />
			</div>
		</div>

		<div id="footer" class="clearfix">Footer</div>

	</div>

	<div id="extra1">&nbsp;</div>
	<div id="extra2">&nbsp;</div>
</body>
</html>